const express = require('express')
const app = express()

app.get('/', (req, res) => res.send('Hello World!'))

const Eureka = require('eureka-js-client').Eureka;

const client = new Eureka({
  filename: 'eureka-client',
  cwd: __dirname
});

client.logger.level('debug');
client.start(function(error) {
  if (error) {
    console.log('Eureka注册失败！');
  } else {
    console.log(error || 'Eureka注册成功！');
  }
});




app.listen(3000, () => console.log('Example app listening on port 3000!'))